package com.ruoyi.durian.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 优惠券模块-优惠券表
 * @TableName ll_coupon
 */
@TableName(value ="ll_coupon")
public class LlCoupon implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    @Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC)
    private Integer id;

    /**
     * 优惠券名称
     */
    @Excel(name = "优惠券名称")
    private String name;

    /**
     * 类型
1打折
2满减
     */
    @Excel(name = "类型" ,readConverterExp = "1=打折，2=满减")
    private Integer type;

    /**
     * 上下架状态（0上架1下架）
     */
    private Integer status;

    /**
     * 优惠金额
     */
    @Excel(name = "优惠金额")
    private BigDecimal saleMoney;

    /**
     * 折扣
     */
    @Excel(name = "折扣")
    private Integer sale;

    /**
     * 满
     */
    @Excel(name = "满")
    private BigDecimal max;

    /**
     * 减
     */
    @Excel(name = "减")
    private BigDecimal min;

    /**
     * 可用开始时间
     */
    @JsonFormat(pattern = "HH:mm", timezone = "GMT+8")
    @Excel(name = "可用开始时间", width = 30, dateFormat = "HH:mm")
    private Date startTime;

    /**
     * 可用结束时间
     */
    @JsonFormat(pattern = "HH:mm", timezone = "GMT+8")
    @Excel(name = "可用结束时间", width = 30, dateFormat = "HH:mm")
    private Date endTime;

    /**
     * 有效期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "有效期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date endValidTime;

    /**
     * 可用车型
     */
    @Excel(name = "可用车型", readConverterExp = "1=一口价,2=经济型,3=特快车,4=出租车")
    private Integer carType;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 是否删除
     */
    @TableLogic
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    public Integer getId() {
        return id;
    }

    /**
     *
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 优惠券名称
     */
    public String getName() {
        return name;
    }

    /**
     * 优惠券名称
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 类型
1打折
2满减
     */
    public Integer getType() {
        return type;
    }

    /**
     * 类型
1打折
2满减
     */
    public void setType(Integer type) {
        this.type = type;
    }

    /**
     * 上下架状态（0上架1下架）
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 上下架状态（0上架1下架）
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 优惠金额
     */
    public BigDecimal getSaleMoney() {
        return saleMoney;
    }

    /**
     * 优惠金额
     */
    public void setSaleMoney(BigDecimal saleMoney) {
        this.saleMoney = saleMoney;
    }

    /**
     * 折扣
     */
    public Integer getSale() {
        return sale;
    }

    /**
     * 折扣
     */
    public void setSale(Integer sale) {
        this.sale = sale;
    }

    /**
     * 满
     */
    public BigDecimal getMax() {
        return max;
    }

    /**
     * 满
     */
    public void setMax(BigDecimal max) {
        this.max = max;
    }

    /**
     * 减
     */
    public BigDecimal getMin() {
        return min;
    }

    /**
     * 减
     */
    public void setMin(BigDecimal min) {
        this.min = min;
    }

    /**
     * 可用开始时间
     */
    public Date getStartTime() {
        return startTime;
    }

    /**
     * 可用开始时间
     */
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    /**
     * 可用结束时间
     */
    public Date getEndTime() {
        return endTime;
    }

    /**
     * 可用结束时间
     */
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    /**
     * 有效期
     */
    public Date getEndValidTime() {
        return endValidTime;
    }

    /**
     * 有效期
     */
    public void setEndValidTime(Date endValidTime) {
        this.endValidTime = endValidTime;
    }

    /**
     * 可用车型
     */
    public Integer getCarType() {
        return carType;
    }

    /**
     * 可用车型
     */
    public void setCarType(Integer carType) {
        this.carType = carType;
    }

    /**
     * 更新时间
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 更新时间
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 是否删除
     */
    public Integer getIsDelete() {
        return isDelete;
    }

    /**
     * 是否删除
     */
    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        LlCoupon other = (LlCoupon) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getSaleMoney() == null ? other.getSaleMoney() == null : this.getSaleMoney().equals(other.getSaleMoney()))
            && (this.getSale() == null ? other.getSale() == null : this.getSale().equals(other.getSale()))
            && (this.getMax() == null ? other.getMax() == null : this.getMax().equals(other.getMax()))
            && (this.getMin() == null ? other.getMin() == null : this.getMin().equals(other.getMin()))
            && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime()))
            && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
            && (this.getEndValidTime() == null ? other.getEndValidTime() == null : this.getEndValidTime().equals(other.getEndValidTime()))
            && (this.getCarType() == null ? other.getCarType() == null : this.getCarType().equals(other.getCarType()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getSaleMoney() == null) ? 0 : getSaleMoney().hashCode());
        result = prime * result + ((getSale() == null) ? 0 : getSale().hashCode());
        result = prime * result + ((getMax() == null) ? 0 : getMax().hashCode());
        result = prime * result + ((getMin() == null) ? 0 : getMin().hashCode());
        result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
        result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
        result = prime * result + ((getEndValidTime() == null) ? 0 : getEndValidTime().hashCode());
        result = prime * result + ((getCarType() == null) ? 0 : getCarType().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", type=").append(type);
        sb.append(", status=").append(status);
        sb.append(", saleMoney=").append(saleMoney);
        sb.append(", sale=").append(sale);
        sb.append(", max=").append(max);
        sb.append(", min=").append(min);
        sb.append(", startTime=").append(startTime);
        sb.append(", endTime=").append(endTime);
        sb.append(", endValidTime=").append(endValidTime);
        sb.append(", carType=").append(carType);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", createTime=").append(createTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
